Barcode Xpress 10 for ActiveX - User Guide > How To > Access Results |
Method | Description |
GetBarcode | Returns the result properties with data of the given barcode index. |
GetBarcodeResultDataValue | Gets the BarcodeResult as an array of bytes. |
GetMakeBarcodeDataValue | Returns the barcode value as an array of bytes. |
Property | Description |
BarcodeResult | Gets the string value of the recognized barcode. |
Confidence | Gets the confidence of the barcode that was recognized. |
BarcodeCodeName | Gets the name of the recognized barcode. |
BarcodeOrientation | Gets and sets the orientation of barcodes to search for in recognition. |
BarcodeH | Gets the height of the image area of the recognized barcode. |
BarcodeW | Gets the width of the image area of the recognized barcode. |
BarcodeAppendCheckSum | Gets and sets a value which determines if a checksum value is appended to the barcode during recognition. |
BarcodeResultStyle | Gets the numeration type of the recognized barcode. |
BarcodeSkew | Gets the angle of the recognized barcode. |
ChecksumCharCount | Gets the number of characters in the recognized checksum. |
ChecksumOK | Gets a check if there is a valid checksum value for the recognized barcode. |
NumBarcodes | Gets the number of barcodes recognized. |
Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.
VB - Example code to get multiple barcode results (in an array) |
Copy Code
|
---|---|
'Sort the results top to bottom Dim BarcodeArray() As BarcodeInfo Redim BarcodeArray(0 To BarcodeXpress1.NumBarcodes - 1) ' fill the user type array For i = 0 To BarcodeXpress1.NumBarcodes - 1 BarcodeXpress1.GetBarcode i BarcodeArray(i).CodeName = BarcodeXpress1.BarcodeCodeName BarcodeArray(i).result = BarcodeXpress1.BarcodeResult BarcodeArray(i).CheckSumOK = BarcodeXpress1.CheckSumOK BarcodeArray(i).Confidence = BarcodeXpress1.Confidence BarcodeArray(i).Length = BarcodeXpress1.ResultLen BarcodeArray(i).X = BarcodeXpress1.BarcodeX BarcodeArray(i).Y = BarcodeXpress1.BarcodeY BarcodeArray(i).H = BarcodeXpress1.BarcodeH BarcodeArray(i).W = BarcodeXpress1.BarcodeW Next i ' actual sort results top to bottom Dim temp As BarcodeInfo For i = Ubound(BarcodeArray) - 1 To 0 Step -1 For j = 0 To i If BarcodeArray(j).Y > BarcodeArray(j + 1).Y Then temp = BarcodeArray(j + 1) BarcodeArray(j + 1) = BarcodeArray(j) BarcodeArray(j) = temp End If Next Next |
1D barcode values are generally 7 bit ASCII, except for Code 128, which permits the use of 8 bit data. If you are using values above 127, you must use the GetBarcodeResultDataValue method instead of the BarcodeResult property, and your data must be encoded. Also, the reader and writer must both use the same character set.
See the Overview of Barcode Xpress topic for code examples on recognition results.